<?php
/**
 * Created by PhpStorm.
 * User: asdf
 * Date: 2021/9/22
 * Time: 20:17
 */

namespace core\lib;


use function core\p;

class APPloader
{
    static function APPloadersingle($strctl){
        $file = APP.'/ctl/'.$strctl.'.php';
        if(is_file($file)){
            include $file;
            return true;
        }else{
            p("找不到控制器!");
            return false;
        }
    }

    static function MAPPloader($forder,$strctl){
        $file = MAPP.$forder.Dirp."ctl".Dirp.$strctl.'.php';
        if(is_file($file)){
            include $file;
            return true;
        }else{
            p("找不到控制器!");
            return false;
        }
    }

    static function Ctlloader($ctl){
        $claz = '\\'.MODULE.Dirp.'ctl'.Dirp.$ctl.'c';
        return $claz;
    }

    static function MCtlloader($forder,$ctl){
        $claz = '\\'.MODULE.'\\MAPP\\'.$forder.'\\ctl\\'.$ctl.'mc';
        return $claz;
    }
}